Optimal. Leaf size=27 \[ -\frac {x}{2 a}-\frac {\cos (x)}{a}+\frac {\sin (x) \cos (x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3872, 2839, 2638, 2635, 8} \[ -\frac {x}{2 a}-\frac {\cos (x)}{a}+\frac {\sin (x) \cos (x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 2638
Rule 2839
Rule 3872
Rubi steps
\begin {align*} \int \frac {\cos ^2(x)}{a+a \csc (x)} \, dx &=\int \frac {\cos ^2(x) \sin (x)}{a+a \sin (x)} \, dx\\ &=\frac {\int \sin (x) \, dx}{a}-\frac {\int \sin ^2(x) \, dx}{a}\\ &=-\frac {\cos (x)}{a}+\frac {\cos (x) \sin (x)}{2 a}-\frac {\int 1 \, dx}{2 a}\\ &=-\frac {x}{2 a}-\frac {\cos (x)}{a}+\frac {\cos (x) \sin (x)}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 27, normalized size = 1.00 \[ -\frac {x}{2 a}+\frac {\sin (2 x)}{4 a}-\frac {\cos (x)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.87, size = 18, normalized size = 0.67 \[ \frac {\cos \relax (x) \sin \relax (x) - x - 2 \, \cos \relax (x)}{2 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.58, size = 44, normalized size = 1.63 \[ -\frac {x}{2 \, a} - \frac {\tan \left (\frac {1}{2} \, x\right )^{3} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} - \tan \left (\frac {1}{2} \, x\right ) + 2}{{\left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}^{2} a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.30, size = 87, normalized size = 3.22 \[ -\frac {\tan ^{3}\left (\frac {x}{2}\right )}{a \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {2 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{a \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}+\frac {\tan \left (\frac {x}{2}\right )}{a \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {2}{a \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )^{2}}-\frac {\arctan \left (\tan \left (\frac {x}{2}\right )\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 81, normalized size = 3.00 \[ \frac {\frac {\sin \relax (x)}{\cos \relax (x) + 1} - \frac {2 \, \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - \frac {\sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} - 2}{a + \frac {2 \, a \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + \frac {a \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}}} - \frac {\arctan \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.24, size = 17, normalized size = 0.63 \[ -\frac {\frac {x}{2}-\frac {\sin \left (2\,x\right )}{4}+\cos \relax (x)}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cos ^{2}{\relax (x )}}{\csc {\relax (x )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________